Skip to content

Conversation

@arnavk23
Copy link
Collaborator

@arnavk23 arnavk23 commented Jan 6, 2026

  • Added a new get_all_tags() method to the Repo class that returns all Git tag names using the existing tags cache
  • Updated Changelog._previous_release() to use Git tags instead of GitHub releases
  • Updated Changelog._is_backport() to use Git tags as well
  • The code still tries to get the GitHub release object for the tag (for metadata like created_at, but falls back gracefully if it doesn't exist
  • The fix ensures TagBot can correctly identify previous versions even when GitHub releases don't exist or have been deleted.
  • Fixes Search for previous tag by Git tag, not by GitHub release #194

arnavk23 and others added 6 commits January 6, 2026 16:49
Fixes JuliaRegistries#194 - Use Git tags instead of GitHub releases for finding
previous releases. This is more reliable because:
- Not all Git tags have GitHub releases
- GitHub releases can be deleted while Git tags remain
- Direct tag lookup is faster and more accurate

Changes:
- Added get_all_tags() method to Repo class
- Modified Changelog._previous_release() to use get_all_tags()
- Modified Changelog._is_backport() to use get_all_tags()
- Updated tests to mock get_all_tags instead of get_releases
- Falls back to get_release() if a GitHub release exists for the tag

This ensures TagBot can correctly identify previous versions even
when GitHub releases don't exist or have been deleted.
- Use UnknownObjectException instead of broad Exception catch
- Get commit datetime via time_of_commit() for fallback object
- Add defensive None check for created_at in _collect_data()
- Add test for fallback behavior

Co-authored-by: Claude <[email protected]>
Copy link
Member

@IanButterworth IanButterworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@IanButterworth IanButterworth merged commit 05a65c1 into JuliaRegistries:master Jan 6, 2026
2 checks passed
@arnavk23 arnavk23 deleted the fix-issue-194 branch January 6, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search for previous tag by Git tag, not by GitHub release

2 participants